package com.platform.omp.common.utils;

import lombok.Data;

import java.io.Serializable;

/**
 * @author liucl
 * @createTime 2022/2/2
 */
@Data
public class PageTableRequest implements Serializable {

    private Integer page;
    private Integer limit;
    private Integer offset;

    public void countOffset() {
        if (null == this.page || null == this.limit) {
            this.offset = 0;
            this.limit = 10;
            return;
        }
        this.offset = (this.page - 1) * limit;
    }

}
